<?php
use TinyLara\TinyRouter\TinyRouter as Route;


//Test first of all
Route::get('test', function() {
	echo '成功！';
});


//Base
Route::any('Base/test', 'Controller\BaseController@test');
Route::get('Base/tmp', 'Controller\BaseController@tmp');


//Index
Route::get('/', 'Controller\IndexController@index');


//Sample
Route::any('Sample/test', 'Controller\SampleController@test');
Route::get('Sample/tmp', 'Controller\SampleController@tmp');


//Test
Route::get('Test/test', 'Controller\TestController@test');
Route::get('Test/tmp', 'Controller\TestController@tmp');
Route::get('Test/tmp2', 'Controller\TestController@tmp2');
Route::get('phpinfo', 'Controller\TestController@phpinfo');
Route::get('Test/reportico', 'Controller\TestController@reportico');
Route::get('Test/getCnf', 'Controller\TestController@getCnf');
Route::get('Test/cookie', 'Controller\TestController@cookie');


//HproseServer
Route::get('HproseServer/test', 'Controller\HproseServerController@test');
Route::get('HproseServer/hproseServer', 'Controller\HproseServerController@hproseServer');


//HproseClient
Route::get('HproseClient/test', 'Controller\HproseClientController@test');
Route::get('HproseClient/hproseClient', 'Controller\HproseClientController@hproseClient');


//Cnf
Route::get('Cnf/test', 'Controller\CnfController@test');
Route::get('Cnf/cnf', 'Controller\CnfController@cnf');

Route::get('Cnf/addCnf', 'Controller\CnfController@addCnf');
Route::post('Cnf/doAddCnf', 'Controller\CnfController@doAddCnf');
Route::get('Cnf/batchAddCnf', 'Controller\CnfController@batchAddCnf');
Route::post('Cnf/doBatchAddCnf', 'Controller\CnfController@doBatchAddCnf');

Route::post('Cnf/doDelCnf', 'Controller\CnfController@doDelCnf');
Route::post('Cnf/doBatchDelCnf', 'Controller\CnfController@doBatchDelCnf');

Route::get('Cnf/editCnf', 'Controller\CnfController@editCnf');
Route::post('Cnf/doEditCnf', 'Controller\CnfController@doEditCnf');
Route::get('Cnf/batchEditCnf', 'Controller\CnfController@batchEditCnf');
Route::post('Cnf/doBatchEditCnf', 'Controller\CnfController@doBatchEditCnf');


//Dict
Route::get('Dict/test', 'Controller\DictController@test');
Route::get('Dict/dict', 'Controller\DictController@dict');

Route::get('Dict/addDict', 'Controller\DictController@addDict');
Route::post('Dict/doAddDict', 'Controller\DictController@doAddDict');
Route::get('Dict/batchAddDict', 'Controller\DictController@batchAddDict');
Route::post('Dict/doBatchAddDict', 'Controller\DictController@doBatchAddDict');

Route::post('Dict/doDelDict', 'Controller\DictController@doDelDict');
Route::post('Dict/doBatchDelDict', 'Controller\DictController@doBatchDelDict');

Route::get('Dict/editDict', 'Controller\DictController@editDict');
Route::post('Dict/doEditDict', 'Controller\DictController@doEditDict');
Route::get('Dict/batchEditDict', 'Controller\DictController@batchEditDict');
Route::post('Dict/doBatchEditDict', 'Controller\DictController@doBatchEditDict');
Route::post('Dict/searchDict', 'Controller\DictController@searchDict');
Route::post('Dict/advanceSearchDict', 'Controller\DictController@advanceSearchDict');


//Cron/Sku
Route::get('Cron/Outlanderp4la/Sku/test', 'Controller\Cron\Outlanderp4la\SkuController@test');
Route::get('Cron/Outlanderp4la/Sku/updateSkuList', 'Controller\Cron\Outlanderp4la\SkuController@updateSkuList');


//Redis
Route::get('Redis/test', 'Controller\RedisController@test');
Route::get('Redis/redis', 'Controller\RedisController@redis');


//Rpc
Route::any('Rpc/yarServer', 'Controller\RpcController@yarServer');
Route::get('Rpc/yarClient', 'Controller\RpcController@yarClient');

Route::any('Rpc/httpServer', 'Controller\RpcController@httpServer');
Route::get('Rpc/httpClient', 'Controller\RpcController@httpClient');


//Card
Route::get('Card/test', 'Controller\CardController@test');
Route::get('Card/placeOrder', 'Controller\CardController@placeOrder');
Route::post('Card/doPlaceOrder', 'Controller\CardController@doPlaceOrder');
Route::get('Card/doPlaceOrderSuccess', 'Controller\CardController@doPlaceOrderSuccess');


//Order
Route::get('Order/test', 'Controller\OrderController@test');
Route::get('Order/placeOrder', 'Controller\OrderController@placeOrder');
Route::post('Order/doPlaceOrder', 'Controller\OrderController@doPlaceOrder');
Route::get('Order/doPlaceOrderSuccess', 'Controller\OrderController@doPlaceOrderSuccess');


//Wcc
Route::get('Wcc/Order/test', 'Controller\Wcc\OrderController@test');
Route::get('Wcc/Order/placeOrder', 'Controller\Wcc\OrderController@placeOrder');
Route::get('Wcc/Order/payOrder', 'Controller\Wcc\OrderController@payOrder');
Route::get('Wcc/Order/cancelOrder', 'Controller\Wcc\OrderController@cancelOrder');
Route::get('Wcc/Order/getOrder', 'Controller\Wcc\OrderController@getOrder');

Route::get('Wcc/Reorder/test', 'Controller\Wcc\ReorderController@test');
Route::get('Wcc/Reorder/placeReorder', 'Controller\Wcc\ReorderController@placeReorder');
Route::get('Wcc/Reorder/cancelReorder', 'Controller\Wcc\ReorderController@cancelReorder');
Route::get('Wcc/Reorder/getReorder', 'Controller\Wcc\ReorderController@getReorder');


//Http
Route::get('Http/test', 'Controller\HttpController@test');
Route::get('Http/server', 'Controller\HttpController@server');
Route::get('Http/client', 'Controller\HttpController@client');


//Cookie
Route::get('Cookie/test', 'Controller\CookieController@test');
Route::get('Cookie/tmp', 'Controller\CookieController@tmp');


//Captcha
Route::get('Captcha/test', 'Controller\CaptchaController@test');
Route::get('Captcha/captcha', 'Controller\CaptchaController@captcha');


//Login
Route::get('Login/test', 'Controller\LoginController@test');
Route::get('Login/doLogin', 'Controller\LoginController@doLogin');


//Mc
Route::get('Mc/test', 'Controller\McController@test');
Route::get('Mc/mc', 'Controller\McController@mc');



//Error 404
Route::get('Error/error404', 'Controller\ErrorController@error404');


//Error: if route is not found
Route::$error_callback = function() {
	//throw new Exception('404 Not Found');
	header('Location: /Error/error404');
	exit(0);
};


//Success
Route::dispatch();



